%%=====================================================================================
%%
%%         File:  bash-hotkeys.tex
%%
%%  Description:  bash-support.vim : Key mappings for Bash with/without GUI.
%%
%%      Version:  see \Pluginversion
%%      Created:  20.05.2013
%%     Revision:  17.02.2018
%%
%%       Author:  Wolfgang Mehner, wolfgang-mehner@web.de
%%                (formerly Dr. Fritz Mehner (fgm), mehner.fritz@web.de)
%%    Copyright:  Copyright (c) 2013-2018, Wolfgang Mehner
%%
%%=====================================================================================

%%======================================================================
%%  LaTeX settings       [[[1
%%======================================================================

\documentclass[oneside,11pt,landscape,DIV16]{scrartcl}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{times}
\usepackage{lastpage}
\usepackage{multicol}
\usepackage{fancyhdr}

\setlength\parindent{0pt}

\newcommand{\Pluginversion}{5.0alpha}
\newcommand{\ReleaseDate}{\today}
\newcommand{\Rep}{{\scriptsize{[n]}}}

%%----------------------------------------------------------------------
%%  fancyhdr
%%----------------------------------------------------------------------
\pagestyle{fancyplain}
\fancyhf{}
\fancyfoot[L]{\small \ReleaseDate}
\fancyfoot[C]{\small bash-support.vim}
\fancyfoot[R]{\small \textbf{Page \thepage{} / \pageref{LastPage}}}
\renewcommand{\headrulewidth}{0.0pt}

%%----------------------------------------------------------------------
%%  luximono : Type1-font
%%  Makes keyword stand out by using semibold letters.
%%----------------------------------------------------------------------
\usepackage[scaled]{luximono}

%%----------------------------------------------------------------------
%%  hyperref
%%----------------------------------------------------------------------
\usepackage{hyperref}
\hypersetup{pdfauthor={Wolfgang Mehner, Germany, wolfgang-mehner@web.de}}
\hypersetup{pdfkeywords={Vim, Perl}}
\hypersetup{pdfsubject={Vim-plug-in,  bash-support.vim, hot keys}}
\hypersetup{pdftitle={Vim-plug-in,  bash-support.vim, hot keys}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  START OF DOCUMENT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}%

\begin{multicols}{3}
%
\begin{center}
%
%%======================================================================
%%  title				[[[1
%%======================================================================
\textbf{\textsc{\small{Vim-Plug-in}}}\\
\textbf{\LARGE{bash-support.vim}}\\
\textbf{\textsc{\small{Version \Pluginversion}}}\\
\vspace{1mm}%
\textbf{\textsc{\Huge{Hot keys}}}\\ 
\vspace{1mm}%
Key mappings for Vim/gVim/Neovim.\\
{\tiny  \texttt{https://www.vim.org}\hspace{1.5mm}---\hspace{1.5mm}\textbf{Wolfgang Mehner},  \texttt{wolfgang-mehner@web.de}}\\
\vspace{1.0mm}
%
%%======================================================================
%%  page 1 / table, left part				[[[1
%%======================================================================
%%~~~~~ TABULAR : begin ~~~~~~~~~~
\begin{tabular}[]{|p{11mm}|p{60mm}|}
%%----------------------------------------------------------------------
%%  menu Help				[[[2
%%----------------------------------------------------------------------
\hline
\multicolumn{2}{|r|}{\textsl{\textbf{H}elp}}\\[1.0ex]
\hline \verb'\he'   & English dictionary                \\
\hline \verb'\hb'   & display the Bash manual           \\
\hline \verb'\hh'   & help (Bash builtins)              \hfill (T)\\
\hline \verb'\hm'   & show manual (cmd. line utilities) \\
\hline \verb'\hp'   & help (plug-in)                    \\
\hline
%%----------------------------------------------------------------------
%%  main menu				[[[2
%%----------------------------------------------------------------------
\hline 
\multicolumn{2}{|r|}{\textsl{\textbf{B}ash}}\\[1.0ex]
\hline \verb'\bps'   & \textbf{p}arameter \textbf{s}ubstitution (list) \hfill (T)\\
\hline \verb'\bsp'   & \textbf{s}pecial \textbf{p}arameters (list)     \hfill (T)\\
\hline \verb'\ben'   & \textbf{en}vironment (list)                     \hfill (T)\\
\hline \verb'\bbu'   & \textbf{bu}iltins (list)                        \hfill (T)\\
\hline \verb'\bse'   & \textbf{se}t options (list)                     \hfill (T)\\
\hline \verb'\bso'   & \textbf{s}h\textbf{o}pts (list)                 \hfill (T)\\
\hline 
%%----------------------------------------------------------------------
%%  menu Comments				[[[2
%%----------------------------------------------------------------------
\hline
\multicolumn{2}{|r|}{\textsl{\textbf{C}omments}}                       \\[1.0ex]
\hline \Rep\verb'\cl'   & end-of-line comment               \hfill (v)\\
\hline \Rep\verb'\cj'   & adjust end-of-line comments       \hfill (v)\\
\hline     \verb'\cs'   & set end-of-line comment col.      \\
%
\hline \Rep\verb'\cc'   & code $\rightarrow$ comment        \hfill (v)\\
\hline \Rep\verb'\co'   & uncomment code                    \hfill (v)\\
%
\hline     \verb'\cfr'  & frame comment                     \\
\hline     \verb'\cfu'  & function description              \\
\hline     \verb'\ch'   & file header                       \\
\hline     \verb'\csh'  & shebang                           \\
\hline     \verb'\cd'   & date                              \\
\hline     \verb'\ct'   & date \& time                      \\
\hline
\end{tabular}\\
%%~~~~~ TABULAR :  end  ~~~~~~~~~~
% ]]]2
%
%%======================================================================
%%  page 1 / table, middle part				[[[1
%%======================================================================
%%~~~~~ TABULAR : begin ~~~~~~~~~~
\begin{tabular}[]{|p{11mm}|p{60mm}|}
%%----------------------------------------------------------------------
%%  menu Comments				[[[2
%%----------------------------------------------------------------------
\hline
\multicolumn{2}{|r|}{\textsl{\textbf{C}omments (cont)}}                       \\[1.0ex]
\hline     \verb'\css'  & script sections                       \hfill (T)\\
\hline     \verb'\ckc'  & keyword comments                      \hfill (T)\\
\hline     \verb'\cma'  & plug-in macros                        \hfill (T)\\
%
\hline     \verb'\ce'   & \texttt{echo} "\textsl{actual line}"  \hfill (v)\\
\hline     \verb'\cr'   & remove \texttt{echo} from actual line \hfill (v)\\
\hline
%%----------------------------------------------------------------------
%%  menu Statements				[[[2
%%----------------------------------------------------------------------
\hline
\multicolumn{2}{|r|}{\textsl{\textbf{S}tatements}}                    \\[1.0ex]
\hline \verb'\sc'  & \verb'case in ... esac'               \\
\hline \verb'\sei' & \verb'elif then'                      \\
\hline \verb'\sf'  & \verb'for in do done'                 \hfill (s)\\
\hline \verb'\sfo' & \verb'for ((...)) do done'            \hfill (s)\\
\hline \verb'\si'  & \verb'if then fi'                     \hfill (s)\\
\hline \verb'\sie' & \verb'if then else fi'                \hfill (s)\\
\hline \verb'\ss'  & \verb'select in do done'              \hfill (s)\\
\hline \verb'\su'  & \verb'until do done'                  \hfill (s)\\
\hline \verb'\sw'  & \verb'while do done'                  \hfill (s)\\
\hline \verb'\sfu' & \verb'function'                       \hfill (s)\\
%
\hline \verb'\se'  & \verb'echo -e ""'                     \hfill (s)\\
\hline \verb'\sp'  & \verb'printf  "%s"'                   \hfill (s)\\
%
\hline \verb'\sae' & array element\ \ \ \verb'${.[.]}'     \hfill (s)\\
\hline \verb'\saa' & arr. elem.s (all) \ \verb'${.[@]}'    \hfill (s)\\
\hline \verb'\sas' & arr. elem.s (1 word) \ \verb'${.[*]}' \hfill (s)\\
\hline \verb'\ssa' & subarray \ \verb'${.[@]::}'           \hfill (s)\\
\hline \verb'\san' & no. of arr. elem.s \ \verb'${.[@]}'   \hfill (s)\\
\hline \verb'\sai' & list of indices \ \verb'${.[*]}'      \hfill (s)\\
\hline
%%
%%----------------------------------------------------------------------
%%  menu Tests				[[[2
%%----------------------------------------------------------------------
\hline
\multicolumn{2}{|r|}{\textsl{\textbf{T}ests}}                 \\[1.0ex]
\hline \verb'\ta'  & arithmetic tests                  \hfill (T)\\
\hline \verb'\tfp' & file permissions                  \hfill (T)\\
\hline \verb'\tft' & file types                        \hfill (T)\\
\hline \verb'\tfc' & file characteristics              \hfill (T)\\
\hline \verb'\ts'  & string comparisons                \hfill (T)\\
\hline \verb'\toe' & option is enabled                 \\
\hline \verb'\tvs' & variables has been set            \\
\hline \verb'\tfd' & file descr.  refers to a terminal \\
\hline \verb'\tm'  & string matches regexp             \\
\hline
%%
\end{tabular}\\
%%~~~~~ TABULAR :  end  ~~~~~~~~~~
% ]]]2
%
%%======================================================================
%%  page 1 / table, right part				[[[1
%%======================================================================
%%~~~~~ TABULAR : begin ~~~~~~~~~~
\begin{tabular}[]{|p{11mm}|p{60mm}|}
%%----------------------------------------------------------------------
%%  menu IO-Redirection				[[[2
%%----------------------------------------------------------------------
\hline
\multicolumn{2}{|r|}{\textsl{\textbf{I}O-Redirection}}                 \\[1.0ex]
\hline \verb'\ior'   & IO-redirections (list)           \hfill (T)\\
\hline \verb'\ioh'   & here-document                    \hfill (s)\\
\hline
%
%%----------------------------------------------------------------------
%%  menu Pattern Matching				[[[2
%%----------------------------------------------------------------------
\hline
\multicolumn{2}{|r|}{\textsl{\textbf{P}attern Matching}}     \\[1.0ex]
\hline \verb'\pzo' & zero or one,      \verb' ?( | )'  \hfill (s)\\
\hline \verb'\pzm' & zero or more,     \verb' *( | )'  \hfill (s)\\
\hline \verb'\pom' & one or more,      \verb' +( | )'  \hfill (s)\\
\hline \verb'\peo' & exactly one,      \verb' @( | )'  \hfill (s)\\
\hline \verb'\pae' & anything except,  \verb' !( | )'  \hfill (s)\\
\hline \verb'\ppc' & POSIX classes                     \hfill (T)\\
\hline \verb'\pbr' &  \verb'${BASH_REMATCH[0'$\ldots$\verb'3]}'  \hfill (T)\\
\hline
%
%%----------------------------------------------------------------------
%%  menu Snippet				[[[2
%%----------------------------------------------------------------------
\hline
\multicolumn{2}{|r|}{\textsl{S\textbf{n}ippets}}               \\[1.0ex]
\hline \verb'\nr'  & read code snippet         \\
\hline \verb'\nv'  & view code snippet         \\
\hline \verb'\nw'  & write code snippet        \hfill (v)\\
\hline \verb'\ne'  & edit code snippet         \\
%
\hline \verb'\ntl' & edit local templates      \\
\hline \verb'\ntc' & edit custom templates     \\
\hline \verb'\ntp' & edit personal templates   \\
\hline \verb'\ntr' & reread the templates      \\
\hline \verb'\ntw' & template setup wizard     \\
\hline \verb'\nts' & choose style              \hfill (T)\\
\hline
\end{tabular}\\[1.0ex]
%%~~~~~ TABULAR :  end  ~~~~~~~~~~
%
%%----------------------------------------------------------------------
%%  box Footnotes   [[[2
%%----------------------------------------------------------------------
\begin{minipage}[b]{72mm}%
\scriptsize{%
all hotkeys work in normal and insert mode \\
visual mode: {\normalsize (v)} use the range,
{\normalsize (s)} surround range \\
tab-completion: {\normalsize (T)} specialized,
{\normalsize (F)} filenames
}%
\end{minipage}
% ]]]2
%
\newpage
%
%%======================================================================
%%  page 2 / table, left part				[[[1
%%======================================================================
%
%%~~~~~ TABULAR : begin ~~~~~~~~~~
\begin{tabular}[]{|p{11mm}|p{60mm}|}
%%----------------------------------------------------------------------
%%  menu Run				[[[2
%%----------------------------------------------------------------------
\hline
\multicolumn{2}{|r|}{\textsl{\textbf{R}un}} \\[1.0ex]
\hline \verb'\rr'  & run script                           \hfill (v)\\
\hline \verb'\rsa' & set script cmd. line arguments       \hfill (F)\\
\hline \verb'\ria' & set interp. cmd. line arguments      \hfill (F)\\
\hline \verb'\rk'  & check syntax                         \\
\hline \verb'\rso' & syntax check options                 \\
\hline \verb'\ro'  & change output destination            \hfill (T)\\
\hline \verb'\rd'  & set ``direct run''                   \hfill (T)\\
\hline \verb'\rse' & set shell executable                 \hfill (T)\\
\hline \verb'\rx'  & set xterm size                       \\
\hline \verb'\re'  & make script executable/not exec.     \\
\hline \verb'\rh'  & hardcopy buffer                      \hfill (v)\\
\hline \verb'\rs'  & plug-in settings                     \\
\hline
\hline \verb'\ra'  & set script cmd. line arguments       \hfill {(\textit{d})}\\
\hline \verb'\rba' & set interp. cmd. line arguments      \hfill {(\textit{d})}\\
\hline \verb'\rc'  & check syntax                         \hfill {(\textit{d})}\\
\hline \verb'\rco' & syntax check options                 \hfill {(\textit{d})}\\
\hline
%%----------------------------------------------------------------------
%%  buffer "Bash Output"				[[[2
%%----------------------------------------------------------------------
\hline
\multicolumn{2}{|r|}{\textsl{Buffer ``Bash Output''}} \\[1.0ex]
\hline \verb'\qf'  & load errors into quickfix             \\
\hline \verb'\qj'  & load into qf.~and jump to first error \\
\hline
\end{tabular}\\[1.0ex]
%%~~~~~ TABULAR :  end  ~~~~~~~~~~
%
%%----------------------------------------------------------------------
%%  box Footnotes   [[[2
%%----------------------------------------------------------------------
\begin{minipage}[b]{72mm}%
\scriptsize{%
{\normalsize (\textit{d})} deprecated, will be removed in next version
}%
\end{minipage}
% ]]]2
\columnbreak
%
%%======================================================================
%%  page 2 / table, middle part				[[[1
%%======================================================================
%
%%----------------------------------------------------------------------
%%  Run Bash   [[[2
%%----------------------------------------------------------------------
\begin{minipage}[b]{72mm}%
\large{\textbf{Run}}\\[1.0ex]
Run \textit{bash} with optional arguments: \\[0.5ex]
\texttt{:Bash [<args>]} \\[1.0ex]
Memorize script arguments: \\[0.5ex]
\texttt{:BashScriptArguments [<args>]} \\[0.5ex]
The memorize arguments are used if \texttt{:Bash} is invoked without arguments. \\[1.0ex]
Set interpreter arguments: \\[0.5ex]
\texttt{:BashInterpArguments [<args>]}
\end{minipage}
\\[2.5ex]
%
%%----------------------------------------------------------------------
%%  Check Syntax   [[[2
%%----------------------------------------------------------------------
\begin{minipage}[b]{72mm}%
\large{\textbf{Syntax}}\\[1.0ex]
Run syntax checking: \\[0.5ex]
\texttt{:BashCheck} \\[1.0ex]
Set syntax checking options: \\[0.5ex]
\texttt{:BashSyntaxCheckOptions <opts>}
\end{minipage}
\\[2.5ex]
%
%%----------------------------------------------------------------------
%%  Options   [[[2
%%----------------------------------------------------------------------
\begin{minipage}[b]{72mm}%
\large{\textbf{Options}}\\[1.0ex]
Set the output method: \\[0.5ex]
\texttt{:BashOutputMethod [<method>]} \\[1.0ex]
Set the shell executable: \\[0.5ex]
\texttt{:BashExecutable [<exec>]} \\[1.0ex]
Set ``direct run'': \\[0.5ex]
\texttt{:BashDirectRun [ yes | no ]} \\[0.5ex]
When set to \texttt{yes}, executable scripts will be run as the executable, instead of using \texttt{:BashExecutable}.
\end{minipage}
\\[2.5ex]
%
%%----------------------------------------------------------------------
%%  Debugger   [[[2
%%----------------------------------------------------------------------
\begin{minipage}[b]{72mm}%
\large{\textbf{BashDB}}\\[1.0ex]
Run the debugger \texttt{bashdb}: \\[0.5ex]
\texttt{:BashDB} \\[1.0ex]
\dots
% TODO
\end{minipage}
% ]]]2
%
\end{center}%
\end{multicols}%
%
%%----- TABBING :  end  ----------
\end{document}
% vim: foldmethod=marker foldmarker=[[[,]]]
